package Ar;

import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class Code04 {
    public static void main(String[] args) {
        double [] score = new double[5];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < score.length; i++) {
            System.out.print("请输入第"+(i+1)+"的学生的成绩：");
            score [i] =sc.nextDouble();
        }
        double max, min;
        max = min = score[0];

        for (int i = 0; i < score.length; i++) {
            if (score[i]>max){
                max = score[i];
            }
            if (score[i]<min){
                min = score[i];
            }
        }
        System.out.println("最大值："+max+"\t最小值："+min);
    }
}
